<template>
  <div>
    <view-grid
      ref="grid"
      :columns="columns"
      :detail="detail"
      :editFormFields="editFormFields"
      :editFormFileds="editFormFields"
      :editFormOptions="editFormOptions"
      :searchFormFields="searchFormFields"
      :searchFormFileds="searchFormFields"
      :searchFormOptions="searchFormOptions"
      :table="table"
      :extend="extend"
    >
    </view-grid>
  </div>
</template>

<script>
import extend from "@/extension/order/tickOrder.js";
import ViewGrid from "@/components/basic/ViewGrid.vue";
import VolForm from "@/components/basic/VolForm.vue";
var vueParam = {
  components: {
    ViewGrid,
    VolForm: VolForm,
    // VolBox: () => import("@/components/basic/VolBox.vue"),
  },
  data() {
    return {
      table: {
        key: "id",
        footer: "Foots",
        cnName: "票库订单",
        name: "Small_procure_order",
        url: "/Small_procure_order/",
        sortName: "createDate",
      },
      extend: extend,
      editFormFields: { order_number: "", createID: "", createDate: "" },
      editFormOptions: [],
      searchFormFields: {
        order_number: "",
        type: "",
        user_id: "",
        trade_order_number: "",
        pay_type: "",
        modifier: "",
        modifyID: "",
        modifyDate: "",
        createDate: "",
        createID: "",
        creator: "",
        ticketsCode: "",
        bookingName: "",
        // distributorCode: "",
        image: "",
        external_order_number1: "",
        // usename: "",
        order_total_price: '',
        supplierProcureCode: '',
      },
      searchFormOptions: [
        [
          { title: "订单号", field: "order_number", type: "like" },
          { title: "取票码", field: "ticketsCode", type: "like" },
          { title: "预订人名称", field: "bookingName", type: "like" },
          { title: "预订人电话", field: "bookingPhone", type: "like" },
        ],
        [
          {
            title: "支付状态",
            field: "is_pay",
            type: "select",
            dataKey: "order_pay",
          },
          { title: "付款时间", field: "pay_time", type: "datetime" },
          // {
          //   title: "分销商",
          //   field: "distributorCode",
          //   type: "select",
          //   dataKey: "distributorList",
          // },
          {
            title: "订单状态",
            field: "status",
            type: "select",
            dataKey: "order_status",
          },
        ],
        [
          {
            title: "外部订单号",
            field: "external_order_number1",
            type: "like",
          },
          // { title: "使用人", field: "usename", type: "like" },
          // {
          //   title: "是否是会员",
          //   field: "is_member",
          //   type: "select",
          //   data: [
          //     { key: 0, value: "否" },
          //     { key: 1, value: "是" },
          //   ],
          // },
        ],
      ],
      columns: [
        {
          field: "id",
          title: "主键",
          type: "string",
          width: 220,
          hidden: true,
          readonly: true,
          require: true,
          align: "left",
        },
        {
          field: "order_number",
          title: "订单号",
          type: "string",
          width: 200,
          align: "left",
        },
        {
          field: "type",
          title: "订单类型",
          bind: { key: "procure_order_type", data: [] },
          type: "string",
          width: 80,
          align: "left",
        },
        {
          field: "status",
          title: "订单状态",
          bind: { key: "order_status", data: [] },
          type: "string",
          width: 105,
          align: "left",
        },
        {
          field: "ticketsCode",
          title: "取票码",
          type: "string",
          width: 150,
          align: "left",
        },
        {
          field: "isTake",
          title: "票状态",
          bind: { key: "order_Take", data: [] },
          type: "int",
          width: 120,
          align: "left",
        },
        {
          field: "quantity",
          title: "票数",
          type: "int",
          width: 100,
          align: "left",
        },
        {
          field: "bookingName",
          title: "预定人名称",
          type: "int",
          width: 120,
          align: "left",
        },
        {
          field: "bookingPhone",
          title: "预定人电话",
          type: "int",
          width: 120,
          align: "left",
        },
        {
          field: "reservationType",
          title: "预订类型",
          bind: { key: "reservationType", data: [] },
          type: "string",
          width: 160,
          align: "left",
        },
        {
          field: "bookingType",
          title: "预订人证件类型",
          bind: { key: "certificate_type", data: [] },
          type: "string",
          width: 160,
          align: "left",
        },
        {
          field: "bookingIdCard",
          title: "预定人证件号",
          type: "int",
          width: 120,
          align: "left",
        },
        {
          field: "supplierProcureCode",
          title: "采购供应商",
          bind: { key: "procurementsupplier", data: [] },
          type: "string",
          width: 180,
          align: "left",
        },
        // {
        //   field: "distributorCode",
        //   title: "分销商",
        //   bind: { key: "distributorList", data: [] },
        //   type: "string",
        //   width: 180,
        //   align: "left",
        // },
        {
          field: "is_pay",
          title: "支付状态",
          bind: { key: "order_pay", data: [] },
          type: "string",
          width: 150,
          align: "left",
        },
        {
          field: "pay_type",
          title: "支付方式",
          bind: { key: "order_pay_type", data: [] },
          type: "string",
          width: 160,
          align: "left",
        },
        // {
        //   field: "spare12",
        //   title: "协议单位",
        //   type: "string",
        //   width: 150,
        //   align: "left",
        // },
        {
          field: "order_total_price",
          title: "订单总金额",
          type: "decimal",
          width: 160,
          align: "left",
        },
        {field:'orderPrice',title:'订单金额',type:'decimal',width:90,align:'left'},
        {field:'isPayDeposit',title:'是否支付押金',type:'string',bind: { key: "enable", data: [] },width:100,align:'left'},
        {field:'paydepositPrice',title:'押金金额',type:'decimal',width:100,align:'left'},
        {
          field: "pay_time",
          title: "付款时间",
          type: "datetime",
          width: 160,
          align: "left",
          sortable: true,
        },
        //{field:'distributorCode',title:'分销商编码',type:'string',width:120,align:'left'},
        {
          field: "offline_order_number",
          title: "线下订单号",
          type: "string",
          width: 160,
          align: "left",
        },
        {
          field: "external_order_number1",
          title: "外部订单号1",
          type: "string",
          width: 160,
          align: "left",
        },
        {
          field: "external_order_number2",
          title: "外部订单号2",
          type: "string",
          width: 160,
          align: "left",
        },
        {
          field: "creator",
          title: "创建人名称",
          type: "string",
          width: 120,
          align: "left",
          sortable: true,
        },
        {
          field: "createID",
          title: "创建人id",
          type: "int",
          width: 90,
          hidden: true,
          align: "left",
        },
        {
          field: "createDate",
          title: "创建时间",
          type: "datetime",
          width: 160,
          align: "left",
          sortable: true,
        },
        {
          field: "modifier",
          title: "修改人名称",
          type: "string",
          width: 120,
          align: "left",
        },
        {
          field: "modifierID",
          title: "修改人id",
          type: "int",
          width: 90,
          align: "left",
          hidden: true,
        },
        {
          field: "modifyDate",
          title: "修改时间",
          type: "datetime",
          hidden: true,
          width: 160,
          align: "left",
          sortable: true,
        },
        // {
        //   field: "image",
        //   title: "小程序二维码",
        //   type: "img",
        //   width: 160,
        //   align: "left",
        // },
        {
          field: "card_equities",
          title: "备注",
          type: "string",
          width: 220,
          align: "left",
        },
        //    {field:'spare15',title:'备用',type:'string',width:220,align:'left'}
      ],
      detail: {
        cnName: "",
        columns: [],
        sortName: "",
        key: "",
      },
    };
  },
};
export default vueParam;
</script>
